#include <iostream>
#include <cmath>

int const maxn = 100000;
int k;

int main()
{
	std::ios::sync_with_stdio(false);
	while (std::cin >> k) {
		if (k <= maxn) {
			std::cout << k << '\n';
			std::cout << 1;
			for (int i = 1; i < k; i++) std::cout << ' ' << 1;
			std::cout << '\n';
		} else {
			int t = std::sqrt(k + 1), max = 0;
			for (int i = 2; i <= t; i++)
				if (!((k+1) % i)) {
					max = i;
				}
			if (max && int((k+1)/max) + max <= maxn+2) {
				int n1 = max-1;
				int n2 = int((k+1)/max) - 1;
				std::cout << n1 + n2 << '\n';
				std::cout << 1;
				for (int i = 1; i < n1; i++)
					std::cout << " " << 1;
				for (int i = 0; i < n2; i++)
					std::cout << " " << n2;
				std::cout << '\n';
			} else {
				int len = 10000;
				bool opt = false;
				for (int n1 = 1; n1 <= len; n1++) {
					for (int n2 = 1; n2 <= len; n2++) {
						int tmp = k - n1 - n2 - n1*n2;
						if (tmp % (1 + n1 + n2) == 0) {
							int n3 = tmp / (1 + n1 + n2);
							if (n1 + n2 + n3 <= maxn) {
								std::cout << 1;
								for (int ii = 1; ii < n1; ii++)
									std::cout << "i " << 1;
								for (int ii = 0; ii < n2; ii++)
									std::cout << "i " << 2;
								for (int ii = 0; ii < n3; ii++)
									std::cout << " " << 3;
								std::cout << '\n';
								opt = true;
								break;
							}
						}
					}
					if (opt) break;
				}
			}
		}
	}
}
